import request from "@/utils/request";
import { serviceModule } from "@/api/serviceModule.js";
// 员工
export function personnel(params) {
  return request({
    baseURL: serviceModule.auth,
    url: "/tenant/organization",
    method: "get",
    params,
  }).then((res) => res.data);
}
// 部门
export function department(params) {
  return request({
    baseURL: serviceModule.auth,
    url: "/department",
    method: "get",
    params,
  }).then((res) => res.data);
}

// 获取分类列表
export function classify(params) {
  return request({
    baseURL: serviceModule.goods,
    url: "/base/backend-classification/get-list",
    method: "get",
    params,
  }).then((res) => res.data);
}

// 获取国家option
export function getCountry() {
  return request({
    baseURL: serviceModule.goods,
    url: `/api/goods/get-countrys`,
    method: "GET",
  });
}

// 获取基础系统字段映射关系
export function getBaseOption(params) {
  return request({
    baseURL: serviceModule.base,
    url: `/v1/base/option`,
    method: "get",
    params,
  });
}


//获取部门option
export function getDepartment() {
  return request({
    baseURL: serviceModule.auth,
    url: `/options`,
    method: "get",
    params: {
      get: ["optDepartment"],
    },
  });
}

// 获取供应商列表
export function getSupplie(data) {
  return request({
    baseURL: serviceModule.pms,
    url: `/v1/base/supplier`,
    method: "post",
    data,
  });
}